package com.mask.roll.edu.controller;

import com.mask.roll.common.constant.RollConstants;
import com.mask.roll.common.util.RollResponse;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.spring.web.json.Json;

import java.util.HashMap;
import java.util.Map;

/**
 * @author hx
 * @since 2021/10/22 11:08 上午
 */

@RestController
@RequestMapping("/edu/user")
public class UserController {

    @PostMapping("/login")
    public RollResponse login(){
        Map map = new HashMap<>();
        map.put("token","admin");
        return RollResponse.result("20000", RollConstants.SUCCESS,"登录成功",map);
    }


    @GetMapping("/info")
    public RollResponse info(){
        HashMap<String, String> map = new HashMap<>();
        map.put("roles","admin");
        map.put("name","admin");
        map.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        return RollResponse.result("20000",RollConstants.SUCCESS,"获取用户信息成功",map);
    }
}
